//返回上一页
	$(".back-btn").click(function() {
		if(UrlData.backStatics==1){
			window.location.href=HostURL+"/sys/goods/toStatisticsGoods";
		}
		else
		{window.location.href=HostURL+"/sys/business/toReviewBusiness";}
	});
//获取id
	var UrlData=GetRequest();
	FoundBusiness(UrlData.id);
	function GetRequest() {
	    var url = location.search; //获取url中"?"符后的字串
	    var theRequest = new Object();
	    if (url.indexOf("?") != -1) {
	        var str = url.substr(1);
	        strs = str.split("&");
	        for(var i = 0; i < strs.length; i ++) {
	            theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
	        }
	    }
	    return theRequest;
	}
//获取信息
	function FoundBusiness(ID){
		var FormJson={"paramJson":{"id":ID},"serviceName":"findBusinesse"}
		$.ajax({
			type:"POST",
			url:DataURL+"sys/business/detail/"+ID,
			dataType:'json', 
			async : false,
			contentType :"application/json;charset=UTF-8", 
			//data: JSON.stringify(FormJson),//传递给服务器的参数
			success:function(data){
				if(checkTokenError(data)){
				InputInfo(data.content[0]);
				}
			},
	        error:function(data){
	            console.log(data)
	            zxTips_short({
	    			txt : "系统错误"
	    			});
	        }
		});
	}
//导入信息
	function InputInfo(Info){
		console.log(Info);
		/*编号*/
		$("#businessId").text(Info.businessId);
		/*状态*/
		if(Info.status=="check")
			{
			$("#status").text("待审核");
			$("#status").addClass("statu1");
			}
		else if(Info.status=="pass")
			{
			$("#status").text("已审核");
			$("#status").addClass("statu2");
			}
		else if(Info.status=="nopass")
			{
			$("#status").text("未通过");
			$("#status").addClass("statu3");
			}
		/*商家名称*/
		$("#name").text(Info.name);
		/*经营品类*/
		$("#categoryName").text(Info.categoryName);
		/*联系人*/
		$("#contact").text(Info.contact);
		/*联系电话*/
		$("#phone").text(Info.phone);
		/*地址*/
		$("#address").text(Info.province+"省 "+Info.city+"市 "+Info.street);
		/*店铺简介*/
		$("#introduce").text(Info.introduce);
		/*店铺照片*/
		var BusinessPic=Info.imgUrl.split(",");
		//console.log(BusinessPic);
		for(var i=0;i<BusinessPic.length;i++){
			if(BusinessPic[i]!="")
			$("#imgUrl").append('<img alt="店铺照片" class="PreviewPic" src="'+BusinessPic[i]+'"/>');
		}
		/*负责人*/
		$("#cardPerson").text(Info.chargePerson);
		/*负责人电话*/
		$("#cardPhone").text(Info.chargePhone);
		/*负责人身份证号*/
		$("#cardIdcard").text(Info.cardIdcard);
		/*负责人银行卡号*/
		$("#cardNumber").text(Info.cardNumber);
		/*负责人身份证照片*/
		$("#imgIdcard").attr("src",Info.imgIdcard);
		/*营业执照*/
		$("#imgBusiLicense").attr("src",Info.imgBusiLicense);
		/*餐饮许可证*/
		if(Info.imgCateringLicense==''){$("#CateringLicense").remove();}
		else{$("#imgCateringLicense").attr("src",Info.imgCateringLicense);}
	}
	
	
